package org.mics.core.page;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(description = "分页查询请求")
public class PageQuery {

	@Schema(description = "开始位置（从0开始）")
	private int pageIndex;
	@Schema(description = "每页多少条")
	private int pageSize = 10;
	@Schema(description = "默认参数")
	private String key;
	

	/**
	 * 页数
	 * author zls
	 * 2020年6月30日
	 */
	@Schema(description = "页数",hidden = true)
	public int getPageNo() {
		return pageIndex/pageSize;
	}
	
}
